package com.ids.idtma.setting;

import com.ids.idtma.ActivityBase;
import com.ids.idtma.IdtApplication;
import com.ids.idtma.R;
import com.ids.idtma.SystemSetting;
import com.ids.idtma.map.IdtMap;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class MeiTiSettingActivity extends ActivityBase implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_mei_ti_setting);
		IdtApplication.getInstance().addActivity(this);
		Intent intent = getIntent();
		String prot0 = intent.getStringExtra("PROT_0");
		String prot1 = intent.getStringExtra("PROT_1");
		String rtp_audio = intent.getStringExtra("RTP_AUDIO");
		String rtp_video = intent.getStringExtra("RTP_VIDEO");
		String tcp_audio = intent.getStringExtra("TCP_AUDIO");
		String tcp_video = intent.getStringExtra("TCP_VIDEO");
		
		TextView video_code = (TextView) findViewById(R.id.PROT_0);
		TextView video_width = (TextView) findViewById(R.id.PROT_1);
		TextView video_height = (TextView) findViewById(R.id.RTP_AUDIO);
		TextView video_bitrate = (TextView) findViewById(R.id.RTP_VIDEO);
		TextView video_fps = (TextView) findViewById(R.id.TCP_AUDIO);
		TextView video_gop = (TextView) findViewById(R.id.TCP_VIDEO);
		((TextView) findViewById(R.id.page_title_name)).setText("媒体传输配置");
		video_code.setText(prot0);
		video_width.setText(prot1);
		video_height.setText(rtp_audio);
		video_bitrate.setText(rtp_video);
		video_fps.setText(tcp_audio);
		video_gop.setText(tcp_video);

	}

	@Override
	public void onClick(View v) {
		Intent intent = new Intent();
		switch (v.getId()) {
		case R.id.return_button:// 返回按钮
			IdtApplication.getInstance().deleteActivity(this);
			break;
		case R.id.map:
			// 点击地图图标
			intent.setClass(MeiTiSettingActivity.this, IdtMap.class);
			intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
			startActivity(intent);
			break;
		}
	}

}
